Skip to content

fix(android): preserve submenu order and apply iconColor tint - #179

Open
OmerToledo wants to merge 1 commit into
mpiannucci:mainfrom
OmerToledo:fix/android-submenu-order-and-icon-tint
Open

fix(android): preserve submenu order and apply iconColor tint#179
OmerToledo wants to merge 1 commit into
mpiannucci:mainfrom
OmerToledo:fix/android-submenu-order-and-icon-tint

Conversation

@OmerToledo

Copy link
Copy Markdown

Summary

  • Bug: addSubMenu(title) defaults menu item order to 0, which moves submenu entries to the front of the menu. Subsequent menu.getItem(i) then resolves the wrong item (wrong icons, broken indexPath callbacks).
  • Fix: Use addSubMenu(Menu.NONE, Menu.NONE, i, title) so submenu order matches createContextMenuAction, keeping items at the intended index.
  • Also: Apply iconColor tint to submenu parent row icons (leaf items already had this behavior).

Testing

Tested in a production app via patch-package on react-native-context-menu-view 1.21.0.

Made with Cursor

Use addSubMenu with explicit order index so submenu items stay at the correct position instead of defaulting to order 0. Also apply iconColor to submenu parent icons, matching leaf menu item behavior.

Co-authored-by: Cursor <cursoragent@cursor.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant